package com.yang.beans.config;

import com.yang.beans.beanclass.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BeanConfig {

    @Bean("bean_User")
    public User getBean(){
        return new User("@Bean方式");
    }
}
